package com.oocl.shopping.service;

import java.util.List;
import java.util.Map;

import com.oocl.shopping.dto.PayBooksDTO;
import com.oocl.shopping.pojo.Customer;
import com.oocl.shopping.pojo.Order;


public interface CustomerService {
	
	/**
	 * 校验cust 名字是否合法
	 * @param cust
	 * @return
	 */
	public boolean isNameFmt(String name);
	
	
	/**
	 * 根据账号 、 密码查询数据库
	 * @param name
	 * @param pwd
	 * @return
	 */
	public Customer findCustomer(String name, String pwd);
	
	/**
	 * 
	 * @param orders
	 * @return
	 */
	public boolean addOneOrder(String bookId, String custId);
	
	/**
	 * 
	 * @param orderId
	 * @return
	 */
	public boolean delOneOrder(String orderId, String custId);
	
	/**
	 * 删除 custId 的所有订单数据
	 * @param custId
	 * @return
	 */
	public boolean delAllOrder(String custId);
	
	/**
	 * 获取 custId 的所有订单信息
	 * @param custId
	 * @return
	 */
	public List<PayBooksDTO> getOrders(String custId);
	
	/**
	 * 
	 * @param custId
	 * @param orders
	 * @return
	 */
	public boolean addOrders(String custId, Map<String, PayBooksDTO> orders);
}
